package org.coding.springbootdemowebmvc.cors;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @auth guoxh
 * @date 2020/10/17 2:46 下午
 * @desc cors 跨域
 **/
@Configuration
public class MyWebConfiguration extends WebMvcConfigurationSupport{
    @Override
    protected void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**");
    }
}
